/**
 * Copyright (C) 2013 The yydorid-framework project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.yangying.androidframework.core.model;

import net.yangying.androidframework.util.ParcelUtils;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * 网站类
 * @author yangying
 * @date 2013-1-10 下午2:15:08
 * @version 1.0
 *
 */
public class GalleryImage implements YYDroid,Parcelable{
	
	/**
	 * 图片id
	 */
	private String id;
	/**
	 * 图片名字
	 */
	private String image;
	/**
	 * 图片对应的链接
	 */
	private String url;
	/**
	 * 排序 递增显示
	 */
	private int order;

	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public GalleryImage(){
		
	}
	
	private GalleryImage(Parcel in) {
		id = ParcelUtils.readStringFromParcel(in);
		image = ParcelUtils.readStringFromParcel(in);
		url = ParcelUtils.readStringFromParcel(in);
		order = in.readInt();
		
	}
	@Override
	public int describeContents() {
		return 0;
	}
	
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		ParcelUtils.writeStringToParcel(dest, id);
		ParcelUtils.writeStringToParcel(dest, image);
		ParcelUtils.writeStringToParcel(dest, url);
		dest.writeInt(order);
	}
	
    public static final Parcelable.Creator<GalleryImage> CREATOR = new Parcelable.Creator<GalleryImage>() {
        public GalleryImage createFromParcel(Parcel in) {
            return new GalleryImage(in);
        }

        @Override
        public GalleryImage[] newArray(int size) {
            return new GalleryImage[size];
        }
    };
	
}
